home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10433 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: ix.netcom.com!netnews
  2. From: Mike Girou <girou@parashift.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Question about visibility of local variables
  5. Date: Wed, 06 Mar 1996 23:45:43 -0600
  6. Organization: Paradigm Shift, Inc.
  7. Message-ID: <313E7807.5CC2@parashift.com>
  8. References: <4hgufv$48h@hpbblb.bbn.hp.com> <4hifc6$hm5@news1.usa.pipeline.com> <4hj56k$elu@sam.inforamp.net>
  9. NNTP-Posting-Host: ix-dfw11-20.ix.netcom.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-NETCOM-Date: Wed Mar 06  9:46:03 PM PST 1996
  14. X-Mailer: Mozilla 2.0 (Win95; I)
  15.  
  16. Randy Charles Morin wrote:
  17. > In article <4hifc6$hm5@news1.usa.pipeline.com>,
  18. >    grantp@usa.pipeline.com(Pete) wrote:
  19. > >On Mar 05, 1996 08:37:19 in article <Re: Question about visibility of local
  20. > >variables>, 'Matthias Dittrich <matti>' wrote:
  21. > >>A variable defined in a block (you should do this at the begin) is valid
  22. > >Why?
  23. > Because its easier to read.
  24. > Agrivar
  25.  
  26. Well, maybe.  Certainly that was the way we did things in C.  But
  27. there has been quite a lot written about declaring/defining at first
  28. use, particularly with class variables.  These arguments include
  29. possible efficiency and the notion that variables needed to properly
  30. initialize may not be known when the "block" is entered.
  31.  
  32. Mike
  33.  
  34.  
  35. -- 
  36. Mike Girou              girou@parashift.com
  37.